#ifndef ADDRESSBOOKDATAACCESS_H
#define ADDRESSBOOKDATAACCESS_H
#include <QSqlQuery>
#include <QString>
#include <QList>
#include <QSqlError>
#include <QSqlDatabase>
#include <QDate>
#include "dal/persistence/DbConnector.h"
#include "entity/Address.h"

// 地址簿数据访问类
class AddressBookDataAccess
{
public:
   // 地址簿详情页显示
   static QList<Address> getAddressBook(const QString &userId);
   // 添加地址信息
   static bool addAddress(const int &userId, const QString &label, const QString &name, const QString &phone, const QString &address);
   // 修改地址簿信息
   static bool editAddress(const int &addressId, const QString &label, const QString &name, const QString &phone, const QString &address);
   // 删除地址簿信息
   static bool deleteAddress(const int &addressld);
   // 根据ID获取地址信息
   static Address getAddressById(const int &addressId);
};

#endif // ADDRESSBOOKDATAACCESS_H
